package com.lzpu.thymeleafproject.demos.servlet;

import org.springframework.context.annotation.Configuration;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

//@Configuration
@WebListener
public class MyListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce){
        System.out.println("项目已启动！");
    }
    public void contextDestroyed(ServletContextEvent sce){
        System.out.println("项目已结束！");
    }


}
